﻿using System;
using System.Collections.Generic;

namespace DVBViMon.Utils
{
	public enum MessageLevel
	{
		Information,
		Warning,
		Error
	}

    public delegate void LogUpdateEventHandler<T>(T entryAdd, T entryRemove);

    interface ILogger<T>
    {
        void Write(string message, MessageLevel level, string[] details = null);
        void Write(string message, Exception exception);

        void Reset();

        void Subscribe(LogUpdateEventHandler<T> handler);
        void Unsubscribe(LogUpdateEventHandler<T> handler);

        IEnumerable<T> Entries { get; }
    }
}
